package com.train.ticket.api;

import com.train.api.TicketApi;
import com.train.common.resp.CommonResp;
import com.train.dto.TicketDTO;
import com.train.ticket.service.TicketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TicketApiImpl implements TicketApi {

    @Autowired
    private TicketService ticketService;

    @Override
    public CommonResp batchSaveTicket(List<TicketDTO> dto) {
        ticketService.batchSaveTicket(dto);
        return CommonResp.ok();
    }
}
